#ifndef LISTWIDGETITEM_H
#define LISTWIDGETITEM_H

#include <QListWidgetItem>
#include <QString>
#include <QIcon>

class ListWidgetItem : public QObject, public QListWidgetItem
{
    Q_OBJECT
public:
    explicit ListWidgetItem(const QString &uuid, QListWidget *parent = 0);
    ~ListWidgetItem();

    void changeStatusOnDoubleCliked();
    void changeStatusOnHasNewMessage();
    void changeStatusOnExit();

public:
    //记录、获取名字
    void setName(const QString &name);
    QString name();
    //改变照片/头像
    void setPhoto(const QIcon &icon);
    QIcon photo();
    //获取uuid
    QString uuid();

private:
    void drawNoReadMessageCount();
private:
    QString m_uuid;
    //头像副本
    QIcon m_photo;
    //未读消息计数
    int m_noReaadMessageCount;
    //默认头像路径
    const static QString m_defaultPhotoPath;
};



#endif // LISTWIDGETITEM_H
